static void gtk_statusbar_update (GtkStatusbar *statusbar,
guint context_id,
const gchar *text);
-static void gtk_statusbar_destroy (GtkWidget *widget);
+
+static void gtk_statusbar_msg_free (GtkStatusbarMsg *msg);
static guint statusbar_signals[SIGNAL_LAST] = { 0 };
{
GtkStatusbar *self = GTK_STATUSBAR (object);
+ g_slist_free_full (self->messages, (GDestroyNotify) gtk_statusbar_msg_free);
+ self->messages = NULL;
+
+ g_slist_free_full (self->keys, g_free);
+ self->keys = NULL;
+
g_clear_pointer (&self->message_area, gtk_widget_unparent);
G_OBJECT_CLASS (gtk_statusbar_parent_class)->dispose (object);
object_class->dispose = gtk_statusbar_dispose;
- widget_class->destroy = gtk_statusbar_destroy;
widget_class->grab_focus = gtk_widget_grab_focus_none;
widget_class->focus = gtk_widget_focus_child;
return gtk_label_get_label (GTK_LABEL (statusbar->label));
}
-
-static void
-gtk_statusbar_destroy (GtkWidget *widget)
-{
- GtkStatusbar *statusbar = GTK_STATUSBAR (widget);
-
- g_slist_free_full (statusbar->messages, (GDestroyNotify) gtk_statusbar_msg_free);
- statusbar->messages = NULL;
-
- g_slist_free_full (statusbar->keys, g_free);
- statusbar->keys = NULL;
-
- GTK_WIDGET_CLASS (gtk_statusbar_parent_class)->destroy (widget);
-}